<template>
    <view class="recode-item card-cell" @click="godetail()">
        <view class="left">
            <text class="type">{{ data.Type == 19 ? data.Remark : data.PayWayName }}</text>
            <text>收款账户:{{ data.PayUserName ? data.PayUserName : "总部" }}</text>
            <text>{{ data.AddTime }}</text>
        </view>
        <view class="right">
            <text class="price">{{ data.Money }}元</text>
            <text class="state-text color-warning" v-if="data.State == 0">待审核</text>
            <text class="state-text" v-if="data.State == 1">充值成功</text>
            <text class="state-text color-danger" v-if="data.State == 2">审核未通过</text>
        </view>
        <view class="icon" v-if="data.Type != 19">
            <uni-icons type="arrowright"></uni-icons>
        </view>
    </view>
</template>

<script>
export default {
    props: {
        data: {
            type: Object,
            default: {},
        },
    },
    data() {
        return {}
    },
    mounted() {},
    methods: {
        godetail() {
            if (this.data.Type != 19) {
                if (this.data.State == 0) {
                    this.easyGoTo("/pages_me/packet/finance/rechargeVoucher?id=" + this.data.ID)
                } else {
                    this.easyGoTo("/pages_me/packet/finance/applyRechargeDetail?id=" + this.data.ID)
                }
            }
        },
    },
}
</script>

<style lang="scss">
.recode-item {
    display: flex;
    flex-direction: row;
    margin-bottom: 20rpx;
    align-items: center;
    .left {
        display: flex;
        flex-direction: column;
        flex: 1;
        text {
            color: $app-color-text-tip;
            margin-bottom: 20rpx;
            &:last-child {
                margin-bottom: 0;
            }
        }
        .type {
            color: $app-color-text-mian;
        }
    }
    .right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        margin-right: 10rpx;
        .price {
            font-size: $font-size-32;
            margin-bottom: 10rpx;
        }
    }
}
.color-warning {
    color: #ff9500 !important;
}
.color-danger {
    color: #ff3b30 !important;
}
</style>
